package com.home.jinlanhua.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @program: jinlanhua
 * @description:
 * @author: Mr.Wang
 * @create: 2020-07-06 15:56
 **/
@EnableTransactionManagement
@Configuration
@MapperScan("com.home.jinlanhua.dao")
public class MybatisPlusConfig {
    // 分页的拦截器对象，目前分页插件只能支持单表查询
    @Bean
    public PaginationInterceptor paginationInterceptor(){
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        return paginationInterceptor;
    }
}
